#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int main()
{
    int N, X, cnt = 0, count = 0;
    cin >> N;
    for (int i = 0; i < N; i++)
    {
        cin >> X;
        if (X >= 10 && X <= 20)
            cnt++;
        else
            count++;
    }
    cout << cnt << " in" << endl;
    cout << count << " out" << endl;
    return 0;
}
